count = 0;
span = 5;
data = ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun','Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
spanPercent = span/data.length*100
function test() {
  if (count == span) {
    count = 0;
  }
  start = spanPercent*count
  end = spanPercent*(count+1)
  option = {
  xAxis: {
    type: 'category',
    boundaryGap: false,
    data
  },
  yAxis: {
    type: 'value'
  },
  series: [
    {
      data: [820, 932, 901, 934, 1290, 1330, 1320,820, 932, 901, 934, 1290, 1330, 1320],
      type: 'line',
      areaStyle: {}
    }
  ],
  dataZoom : [
          {
            id: "dataZoomX",
            type: "slider",
            xAxisIndex: [0],
            filterMode: "filter",
            start,
            end,
            show:false
          },
        ]
};
  
  option && myChart.setOption(option);
  count++;

  setTimeout(function () {
    test();
  }, 1000);
}
test();